﻿using WH.Model.Bases;
using WH.Common.Bases.IBase;
using SqlSugar;

namespace WH.Model.Systems
{
    ///<summary>
    ///角色授权表
    ///</summary>
    [SugarTable("sys_role_permission")]
    public class RolePermissionEntity : BaseOrgAuditableEntity, IOrganizationFilter
    {
        /// <summary>
        /// 项目类型0-主菜单 1-子菜单 2-按钮3-其它 100-地图200-区域 300-告警
        /// </summary>         
        [SugarColumn(ColumnName = "resource_type", IsNullable = true, Length = 11, ColumnDescription = "项目类型0-主菜单 1-子菜单 2-按钮3-其它 100-地图200-区域 300-告警")]
        public int? ResourceType { get; set; }

        /// <summary>
        /// 项目主键
        /// </summary>           
        [SugarColumn(ColumnName = "resource_id", IsNullable = false, Length = 50, ColumnDescription = "项目主键")]
        public string ResourceId { get; set; } = null!;

        /// <summary>
        /// 对象分类1-角色2-部门-3用户
        /// </summary>         
        [SugarColumn(ColumnName = "role_type", IsNullable = true, Length = 11, ColumnDescription = "对象分类1-角色2-部门-3用户")]
        public int RoleType { get; set; }

        /// <summary>
        /// 对象主键
        /// </summary>        
        [SugarColumn(ColumnName = "role_id", IsNullable = true, Length = 50, ColumnDescription = "对象主键")]
        public string RoleId { get; set; } = null!;

        /// <summary>
        /// 排序码 数字越小越靠前
        /// </summary>           
        [SugarColumn(ColumnName = "sort_code", IsNullable = true, Length = 11, ColumnDescription = "排序码 数字越小越靠前")]
        public int SortCode { get; set; }

        /// <summary>
        /// 状态（0停用 1正常）
        /// </summary>           
        [SugarColumn(ColumnName = "is_enable", IsNullable = true, Length = 1, ColumnDescription = "状态（0停用 1正常）")]
        public bool IsEnable { get; set; }

        /// <summary>
        /// 描述/备注说明
        /// </summary>           
        [SugarColumn(ColumnName = "remark", IsNullable = true, Length = 255, ColumnDescription = "描述/备注说明")]
        public string? Remark { get; set; }

    }
}
